package entry

import (
	_ "SkyPath/internal/domain/dbtools/constant"
	"SkyPath/internal/domain/dbtools/service"
	"github.com/gin-gonic/gin"
	"net/http"
)

/*
	和前端对接的入口
*/

func GetDistributeData(module string, data int, c *gin.Context) {

	dbtools := &service.Dbtools{}
	num := dbtools.GetDnAndGTMCount(module, data)
	if num == 0 {
		c.JSON(http.StatusForbidden, 0)
		return
	}
	res := map[string]int{
		"num": num,
	}
	c.JSON(http.StatusOK, res)

}
